package cn.learn.designpattern.decorator.decorator;

/**
 * 装饰角色
 *
 * @author huangyezhan
 * @date 2019年02月23日22:59
 */
public class Decorator implements Component {

    private final Component component;


    public Decorator(Component component) {
        this.component = component;
    }

    @Override
    public void sampleOperation() {
        //委派给构件
        System.out.println("装饰角色_准备加料");
        this.component.sampleOperation();
    }

}
